package com.liyao.windowtest4.controller;

import com.liyao.windowtest4.service.loginService;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;


/**
 * @program: windowtest4
 * @description:
 * @author: liu yan
 * @create: 2024-10-19 17:28
 */
@Controller
@Component
public class loginController {

    @Resource
    loginService service;

    @FXML
    TextField username;

    @FXML
    TextField password;

    @FXML
    public void login(ActionEvent actionEvent) {
        System.out.println("username:"+username.getText());
        System.out.println("password:"+password.getText());
        service.getUserMes(username.getText(),password.getText());
    }
}
